<template>
<baidu-map class="bm-view" :center="{lng: 116.403765, lat: 39.914850}" :zoom="11">
    <bm-view class="bm-view"></bm-view>
    <bm-control :offset="{width: '10px', height: '10px'}">
        <bm-auto-complete v-model="keyword" :sugStyle="{zIndex: 1}">
            <input placeholder="请输入地名关键字"></input> <!-- 这里指代一个自定义搜索框组件 -->
        </bm-auto-complete>
    </bm-control>
    <bm-local-search :keyword="keyword" :auto-viewport="true" ></bm-local-search>
</baidu-map>
</template>
<script>
    export default {
        data () {
            return {
                keyword: ''
            }
        }
    }
</script>

<style>
    .bm-view {
        width: 100%;
        height: 300px;
    }
</style>